import appIcon from '@/assets/app-icon.png';
export function mockAPI(data){
    return new Promise((resolve, reject)=>{
        setTimeout(()=>{
            resolve(data);
        }, 500)
    })
}

export const tagListMaps = {
    'app':[
        { label:'智慧能源', key:'1' },
        { label:'智慧安防', key:'2' },
        { label:'智慧环境', key:'3' }
    ],
    'service':[
        { label:'双碳认证', key:'1' },
        { label:'节能咨询', key:'2' },
        { label:'企业管理', key:'3' }
    ]
} 


let arr = [];
for(let i = 0; i < 20; i++ ) {
    let tempArr=[];
    let length = Math.floor(Math.random()*3);
    for(let j=0; j<=length;j++){
        tempArr[j] = tagListMaps['app'][j];
    }
    arr.push({ 
        appName:'IEMS能源' + ( i + 1 ), 
        type: i % 3 === 0 ? '场景应用' : '模块应用', 
        tags: tempArr,
        desc:'通过采集各类能耗监测点(变配电、照明、空调、冷热水、燃气、机组和其',
        status:i % 2 === 0 ? 0 : 1,
        key:i,
        icon:appIcon
    })
}
export const appList = arr;